home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 July: Mac OS SDK / Dev.CD Jul 97 SDK1.toast / Development Kits (Disc 1) / QuickDraw 3D / Samples / SampleCode / BackGround / BackGroundSupport.h < prev    next >
Encoding:
Text File  |  1996-05-21  |  2.2 KB  |  65 lines  |  [TEXT/MPCC]

  1. // QuickDraw 3D sample code
  2. //
  3. // Nick Thompson, AppleLink: DEVSUPPORT (devsupport@applelink.apple.com)
  4. //
  5. // ©1994-5 Apple Computer Inc., All Rights Reserved
  6.  
  7. #ifndef _MY3DSUPPORT_H_
  8. #define _MY3DSUPPORT_H_
  9.  
  10. // Macintosh System Stuff
  11. #include <Types.h>
  12. #include <Windows.h>
  13.  
  14. // QuickDraw 3D stuff
  15. #include "QD3D.h"
  16. #include "QD3DErrors.h"
  17. #include "QD3DView.h"
  18.  
  19. //-------------------------------------------------------------------------------------------
  20.  
  21. struct _documentRecord {
  22.     GWorldPtr        fGWorld ;                // the offscreen used as the basis for this apps
  23.                                             // pixmap draw context
  24.     TQ3ViewObject    fView ;                    // the view for the scene
  25.     TQ3GroupObject    fModel ;                // object in the scene being modelled
  26.     TQ3StyleObject    fInterpolation ;        // interpolation style used when rendering
  27.     TQ3StyleObject    fBackFacing ;            // whether to draw shapes that face away from the camera
  28.     TQ3StyleObject    fFillStyle ;            // whether drawn as solid filled object or decomposed to components
  29.     TQ3Point3D        fGroupCenter ;            // the center point of the main group
  30.     float            fGroupScale ;            // how much to scale for the camera
  31.     TQ3Matrix4x4    fRotation;                // the transform for the model
  32.     
  33.     GWorldPtr        fBgPicture ;            // stores the background pict
  34.     GWorldPtr        fCompositeBuffer ;        // to composite the bg with the 3d picture
  35. };
  36.  
  37. typedef struct _documentRecord DocumentRec, *DocumentPtr, **DocumentHdl ;
  38.  
  39. //---------------------------------------------------------------------------------------
  40.  
  41. extern const RGBColor    kClearColor ;
  42.  
  43. OSErr MyQD3DInitialize( void ) ;
  44. OSErr MyQD3DExit() ;
  45.  
  46. TQ3ViewObject        MyNewView(GWorldPtr theGWorld) ;
  47. TQ3DrawContextObject MyNewDrawContext(GWorldPtr theGWorld) ;
  48. TQ3CameraObject        MyNewCamera(CGrafPtr thePort) ;
  49. TQ3GroupObject        MyNewLights(void) ;
  50. TQ3GroupObject        MyNewModelFromFile(FSSpec *theFileSpec) ;
  51. TQ3Status             SubmitScene( DocumentPtr theDocument ) ;
  52.  
  53. TQ3Point3D AdjustCamera(
  54.     DocumentPtr            theDocument,
  55.     short                winWidth,
  56.     short                winHeight) ;
  57.     
  58. Boolean             MetafileFileSpecify( FSSpec *theFile ) ; 
  59. Boolean                PictureFileSpecify( FSSpec *theFile ) ;
  60. PicHandle             OpenPICTFile( FSSpec *theFile ) ;
  61.  
  62. TQ3Status             MyReadModelFromFile( TQ3FileObject theFile,TQ3GroupObject myGroup) ;
  63.  
  64. #endif
  65.